<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="fragment :: myhead(~{::title},~{})">
    <title >测试权限</title>
</head>
<body>
<fieldset class="layui-elem-field ">
    <span shiro:user="">已经登录</span><span shiro:principal=""></span>
    <span shiro:guest="">您是游客</span><br>
    <span shiro:hasRole="role1">有角色1</span>
    <span shiro:hasRole="role2">有角色2</span>
    <span shiro:hasRole="role3">有角色3</span>
    <span shiro:hasRole="role4">有角色4</span>
    <span shiro:hasRole="role5">有角色5</span>
</fieldset>
<script>
    //一般直接写在一个js文件中
    layui.use(['layer', 'form','jquery'], function(){
        var layer = layui.layer;
        var form = layui.form;
        var $ = layui.jquery;
    });
</script>

</body>
</html>